package main

import "fmt"

func main() {
	nums := []int{1, 2, 3}

	sum := 0

	for _, num := range nums {
		sum += num
	}

	fmt.Println("sum", sum)

	for i, num := range nums {
		if num == 3 {
			fmt.Println("index", i)
		}
	}

	myMap := map[string]int{"a": 1, "b": 2, "c": 3}

	for key, value := range myMap {
		fmt.Println("key", key)
		fmt.Println("value", value)
	}

	for key, value := range "ABCDEF" {
		fmt.Println("key", key)
		fmt.Println("value", value)
	}

}
